package ua.openmedis.service.impl;

import java.util.List;

import ua.openmedis.dao.api.AssetGenericNameDAO;
import ua.openmedis.dao.impl.AssetGenericNameDAOImpl;
import ua.openmedis.domain.AssetGenericName;
import ua.openmedis.service.api.UmdnsService;

public class UmdnsServiceImpl implements UmdnsService {
	
	//TODO Spring injection
	AssetGenericNameDAO assetGenericNameDAO = new AssetGenericNameDAOImpl();

	@Override
	public List<AssetGenericName> findAllUmdnsCodes() {	
		return assetGenericNameDAO.findAll();
	}
	
	public List<AssetGenericName> findCodesByName(String genericAssetName) {	
		//assetGenericNameDAO.indexDatabase();
		return assetGenericNameDAO.findByName(genericAssetName);
	}

}
